<?php
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!');

global $caut; $caut = $comment_author;
global $caut_email; $caut_email = $comment_author_email;
global $caut_url;$caut_url = $comment_author_url;

if (!empty($post->post_password)) { // if there's a password and if it doesn't match the cookie
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  ?>

<p class="nocomments"><?php _e("This post is password protected. Enter the password to view comments."); ?><p>

<?php return; }} ?>

<?php /* ---You can start editing here.--- */ ?>

<?php if ($comments) :

	/* This variable is for alternating comment background */

	$oddcomment = 'alt';

?>

<div class="comments-head">
	<h4 id="comments">
		<span class="h4">Comments &amp; Response</span>
		<span class="counter"> <?php comments_number('No Comments', 'One Comment', '% Comments' );?></span>
	</h4>
	<p id="comments-rss"><?php comments_rss_link('RSS 2.0'); ?></p>
</div>

<p id="comments-rule"><?php ta_include('comments-rule.php'); ?></p>

<ol id="comments-list">

	<?php foreach ($comments as $comment) : ?>

		<?php ta_include('the-comment.php');?>

		<?php endforeach; /* end for each comment */ ?>

</ol>

<?php else : // this is displayed if there are no comments so far ?>
	<?php if ('open' == $post-> comment_status) : ?>
	<!-- If comments are open, but there are no comments. -->
	<?php else : // comments are closed ?>
	<!-- If comments are closed. -->
	<p class="nocomments">Comments are closed.</p>
	<?php endif; ?>
<?php endif; ?>

<?php if ('open' == $post->comment_status) : ?>

<h4 id="reply">Leave a Reply</h4>

<?php if ( get_option('comment_registration') && !$user_ID ) : ?>

	<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>

<?php else : ?>

<?php ta_include('comment-form.php'); ?>

<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>